var sessionsDATA;
var qcmDATA;


function loadSessionData(callback) {
	$.getJSON('/QCM-Server/SessionServlet', function(data) {
		sessionsDATA = data;
		callback();
	});
}




function loadQCMData(callback){
	if (localStorage["QCM"] == null){
		$.getJSON('/QCM-Server/QCMServlet?idTest=' + localStorage["idCurrentTest"], function(data){
			qcmDATA = data;
			callback();
		});
	} else {
		qcmDATA = JSON.parse(localStorage["QCM"]);
		callback();
	}
}